package com.example.statistics.bean

import com.example.statistics.ex.formatPath
import java.io.Serializable

data class ProductBean(
        val id: Int = 0,
        val productType: String = "",
        val nation: String = "",
        val company: String = "",
        val factoryNo: String = "",
        val productName: String = "",
        val productNo: String = "",
        val specification: String = "",
        val priceTrend: String = "",
        val remark: String = "",
        val productDetail: List<ProductItemBean>? = null,
        val imageList: List<FilesBean>? = null
) : Serializable

data class ProductItemBean(
        val id: Int = 0,
        val productDate: String = "",
        val productBatch: String = "",
        val remark: String = "",
        val imageList: MutableList<String>? = mutableListOf()
) : Serializable {
    val formatPathList: MutableList<String>
        get() = imageList.orEmpty().map { it.formatPath }.toMutableList()
}